/*
package cn.itcast.web.controller.cargo;

import cn.itcast.service.cargo.PackingService;
import cn.itcast.web.controller.BaseController;
import com.alibaba.dubbo.config.annotation.Reference;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

@RequestMapping("/cargo/packing")
@Controller
@Slf4j
public class packingController extends BaseController {

    @Reference
    private PackingService packingService;

    */
/**
     * 装箱单列表
     * @param id
     * @param pageNum
     * @param pageSize
     * @return
     *//*

    @RequestMapping("/list")
    public String list(String id,
                       @RequestParam(defaultValue = "1") Integer pageNum,
                       @RequestParam(defaultValue = "5")Integer pageSize){
        //构造条件对象
        PackingExample Packingexample = new PackingExample();
        //根据创建时间降序
        Packingexample.setOrderByClause("create_time desc");
        //获取条件的集合，获取Criteris对象来设置查询条件
        PackingExample.Criteria criteria = Packingexample.createCriteria();
        //设置查询条件
        criteria.andCompanyIdEqualTo(getLoginCompanyId());

        PageInfo<Packing> pageInfo = packingService.findByPage(Packingexample,pageNum,pageSize);
        request.setAttribute("pageInfo",pageInfo);

        return "cargo/packing/packing-list";
    }




    @RequestMapping("/toPacking")
    public String toPacking(String id){
        //获取报运合同号

        request.setAttribute("id",id);
        return "cargo/packing/packing-add";
    }

    @RequestMapping("/edit")
    public String edit(Packing Packing){

    }







    *
     * 5. 删除
     * 返回的数据：{"message":1}

    @GetMapping("/delete")
    @ResponseBody // 自动把方法返回的对象转json
    public Map<String,Integer> delete(String id){
        //1. 定义返回结果
        Map<String,Integer> map = new HashMap<>();

        //2. 调用service，删除
        boolean flag = deptService.delete(id);
        if (flag){
            map.put("message",1);
        }else{
            map.put("message",0);
        }
        return map;
    }
}
*/
